#ifndef __CALIB_
#define __CALIB_

#include <opencv2/opencv.hpp>
#include <memory.h>

using namespace std;
using namespace cv;

class HandInEye;
using p_HandInEye = shared_ptr<HandInEye>;

class HandInEye
{
public:
	HandInEye(Mat_<double>, Mat_<double>, Mat &, cv::HandEyeCalibrationMethod = CALIB_HAND_EYE_TSAI);
	~HandInEye(){};
	void test();

private:
	void __Transform(Mat_<double>, Mat_<double>);
	void __calculate(cv::HandEyeCalibrationMethod);

private:
	vector<Mat> _R_gripper2base;
	vector<Mat> _T_gripper2base;
	vector<Mat> _R_target2cam;
	vector<Mat> _T_target2cam;
	//相机与机械臂末端坐标系的旋转矩阵与平移矩阵
	Mat _R_cam2gripper = Mat(3, 3, CV_64FC1);
	Mat _T_cam2gripper = Mat(3, 1, CV_64FC1);
	Mat _H_cam2gripper = Mat(4, 4, CV_64FC1);

	vector<Mat> _H_target2cam;
	vector<Mat> _H_gripper2base;
};

#endif